import { downBase64 } from '@/hooks/down'
import { sharePic } from '@/hooks/sharePic'
import bus from '@/framework/plugins/bus'

// 保存
bus.$on('linkMethod',(res => {
	if(res.type === 'saveImage'){
		return downBase64(res.imgBase64)
	}
}))

// 分享
bus.$on('linkMethod',(res => {
	if(res.type === 'shareImg'){
		return sharePic(res.imgBase64)
	}
}))